<template>
  <el-dialog :title="title" :close-on-click-modal="false" :fullscreen="true" :visible.sync="visible"
    :before-close="cancel" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="50%">

    <div class="block">
    <el-timeline>
    <el-timeline-item timestamp="预约资料" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
          <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          <el-col :span="8">
            <el-form-item label="单号" prop="FBILLNO">
              <el-input v-model="dataForm.FBILLNO"  disabled />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="预约日期" prop="FBILLCREDATE">
              <el-date-picker v-model="dataForm.FBILLCREDATE" value-format="yyyy-MM-DD" type="date" placeholder="选择日期">
              </el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="8">
              <el-form-item label="预约状态">
                <el-select v-model="dataForm.FBILLSTATE" placeholder="请选择" disabled>
                  <el-option
                    v-for="item in options1"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>


          <el-col :span="8">
            <el-form-item label="预约人员" prop="FUSER">
              <el-input v-model="dataForm.FUSER"   />
            </el-form-item>
          </el-col>

          <el-col :span="8">
              <el-form-item label="仓库名称">
                <el-select v-model="dataForm.FSTOCK" placeholder="请选择" >
                  <el-option
                    v-for="item in options2"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="8">
              <el-form-item label="处置企业">
                <el-select v-model="dataForm.FSUPPLIER" placeholder="请选择" >
                  <el-option
                    v-for="item in options3"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>

          <el-col :span="8">
            <el-form-item label="备注" prop="FMEMO">
              <el-input v-model="dataForm.FMEMO"   />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="审核人员" prop="FCHECKUSE">
              <el-input v-model="dataForm.FCHECKUSE" disabled  />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="审核日期" prop="FCHECKDATE">
              <el-input v-model="dataForm.FCHECKDATE"  disabled />
            </el-form-item>
          </el-col>

          <el-col :span="5">
            <el-form-item label="">
              <!-- <el-button type="success" icon="el-icon-plus" @click="insert">添加危废桶</el-button> -->
              <el-button type="primary" :loading="loading">返回</el-button>
            </el-form-item>
          </el-col>
        </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="待出库危废列表" placement="top">
      <el-card>
        <el-table :data="list2" border stripe>
          <el-table-column prop="FENTRYID" label="序号" width="85"></el-table-column>
          <el-table-column prop="FCATNO" label="桶固定码" ></el-table-column>
          <el-table-column prop="FCATNAME" label="危废桶名称" ></el-table-column>
          <el-table-column prop="FNAME" label="危废名称" ></el-table-column>
          <el-table-column prop="FWEIGHT" label="过磅重量(kg)" width="105"></el-table-column>
        </el-table>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="确认说明" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="8">
            <el-form-item label="取货日期" prop="FGETDATE">
              <el-date-picker v-model="dataForm.FGETDATE" value-format="yyyy-MM-DD" type="date" placeholder="选择日期">
              </el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="取货人员" prop="FGETUSER">
              <el-input v-model="dataForm.FGETUSER"   />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="手机号码" prop="FTELNO">
              <el-input v-model="dataForm.FTELNO"   />
            </el-form-item>
          </el-col>
          

          <el-col :span="16">
            <el-form-item label="确认说明" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="3"
                placeholder="请输入内容"
                v-model="textarea">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="车牌" prop="FCARDNO">
              <el-input v-model="dataForm.FCARDNO"   />
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>
  </el-timeline>

</div>

  </el-dialog>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    components: {  },
    props: {
      formationlist: {
        type: Array,
        default: [],
      },
    },
    data() {
      return {
        textarea: '同意该项目',
        value1: new Date(2024, 12, 2, 12, 0),

        title: "新增",
        insertorupdate: true,
        dataForm: {
          FBILLNO: "K241130001", 
            FBILLCREDATE:"2024-11-29",
            FUSER: "曹操",
            FHOME: "化学与材料科学学院",
            FTEACH:"秦始皇",
            FGROUP: "分析测试中心",
            FBEGDATE: "2025-02-01",
            FENDDATE:"2025-04-30",
            FMEMO: "分三个阶段执行",
            FCATNAME:"医疗垃圾智慧处理系统",
            FWEEK: "3个月",
            FNUM: 4,
            FMONEY: "10万",
            FNOTE:"",
            FBILLTYPE:"研究生",
            FBILLSTATE: "已通过"
        },
        rules: {
          FUSERNUMBER:[
            { required: true, message: '请输入学籍号码', trigger: 'blur' },
          ],
          FUSER: [
            { required: true, message: '请输入申请人员', trigger: 'blur' },
          ],
          FMEMO: [
            { required: true, message: '请输入申请理由', trigger: 'blur' },
          ],
        },
        list2: [{  "FENTRYID":1,
                  "FCATNO":"Z24080100028",
                  "FCATNAME":"危废化学品盛漏油桶",
                  "FNAME":"生物实验废物",
                  "FWEIGHT":"45.0",
                },
                { "FENTRYID":1,
                  "FCATNO":"Z240801000965",
                  "FCATNAME":"危废化学品盛漏油桶",
                  "FNAME":"生物实验废物",
                  "FWEIGHT":"53.7",
                }],
        loading: false,
        visible: false,

        //所属校区选择数据
        options1: [{
          value: '1',
          label: '验收中'
        }, {
          value: '2',
          label: '已验收'
        }, {
          value: '3',
          label: '已驳回'
        }],

        //仓库
        options2: [{
          value: '1',
          label: '化学系仓库'
        }, {
          value: '2',
          label: '生物系仓库'
        }],

        //供应商
        options3: [{
          value: '1',
          label: '广州福兴实验室设备科技'
        }, {
          value: '2',
          label: '江苏艾普瑞实验设备有限公司'
        }, {
          value: '3',
          label: '江苏艾普瑞实验设备有限公司'
        }],
        
      };
    },
    created() {
    },
    mounted() { },
    methods: {
      //
      init(FBILLNO) {
        this.dataForm.FBILLNO = FBILLNO;
        if (this.dataForm.FBILLNO) {
          this.title = "修改"
          this.insertorupdate = false;
        }
        else {
          this.title = "新增"
          this.dataForm.FBILLNO = "K" + Math.floor(Math.random() * 10000000) + 1;
          this.insertorupdate = true;
        }
        this.visible = true;
      },
      shoplist(data) {
        data.forEach(item => {
          this.list.push({
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "1"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "曹操"
          },{
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "2"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "刘备"
          })
        });
      },
      //
      cancel() {
        this.list = [];
        this.visible = false;
      },
    },
  };
</script>